3.1.11 \(\int \frac {\csc ^4(x)}{a+a \sin (x)} \, dx\) [11]

Optimal. Leaf size=55 \[ \frac {3 \tanh ^{-1}(\cos (x))}{2 a}-\frac {4 \cot (x)}{a}-\frac {4 \cot ^3(x)}{3 a}+\frac {3 \cot (x) \csc (x)}{2 a}+\frac {\cot (x) \csc ^2(x)}{a+a \sin (x)} \]

[Out]

3/2*arctanh(cos(x))/a-4*cot(x)/a-4/3*cot(x)^3/a+3/2*cot(x)*csc(x)/a+cot(x)*csc(x)^2/(a+a*sin(x))

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {2847, 2827, 3852, 3853, 3855} \begin {gather*} -\frac {4 \cot ^3(x)}{3 a}-\frac {4 \cot (x)}{a}+\frac {3 \tanh ^{-1}(\cos (x))}{2 a}+\frac {3 \cot (x) \csc (x)}{2 a}+\frac {\cot (x) \csc ^2(x)}{a \sin (x)+a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[x]^4/(a + a*Sin[x]),x]

[Out]

(3*ArcTanh[Cos[x]])/(2*a) - (4*Cot[x])/a - (4*Cot[x]^3)/(3*a) + (3*Cot[x]*Csc[x])/(2*a) + (Cot[x]*Csc[x]^2)/(a
 + a*Sin[x])

Rule 2827

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]

Rule 2847

Int[((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-b
^2)*Cos[e + f*x]*((c + d*Sin[e + f*x])^(n + 1)/(a*f*(b*c - a*d)*(a + b*Sin[e + f*x]))), x] + Dist[d/(a*(b*c -
a*d)), Int[(c + d*Sin[e + f*x])^n*(a*n - b*(n + 1)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && Ne
Q[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[n, 0] && (IntegerQ[2*n] || EqQ[c, 0])

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\csc ^4(x)}{a+a \sin (x)} \, dx &=\frac {\cot (x) \csc ^2(x)}{a+a \sin (x)}-\frac {\int \csc ^4(x) (-4 a+3 a \sin (x)) \, dx}{a^2}\\ &=\frac {\cot (x) \csc ^2(x)}{a+a \sin (x)}-\frac {3 \int \csc ^3(x) \, dx}{a}+\frac {4 \int \csc ^4(x) \, dx}{a}\\ &=\frac {3 \cot (x) \csc (x)}{2 a}+\frac {\cot (x) \csc ^2(x)}{a+a \sin (x)}-\frac {3 \int \csc (x) \, dx}{2 a}-\frac {4 \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (x)\right )}{a}\\ &=\frac {3 \tanh ^{-1}(\cos (x))}{2 a}-\frac {4 \cot (x)}{a}-\frac {4 \cot ^3(x)}{3 a}+\frac {3 \cot (x) \csc (x)}{2 a}+\frac {\cot (x) \csc ^2(x)}{a+a \sin (x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(113\) vs. \(2(55)=110\).
time = 0.56, size = 113, normalized size = 2.05 \begin {gather*} \frac {-20 \cot \left (\frac {x}{2}\right )+3 \csc ^2\left (\frac {x}{2}\right )+36 \log \left (\cos \left (\frac {x}{2}\right )\right )-36 \log \left (\sin \left (\frac {x}{2}\right )\right )-3 \sec ^2\left (\frac {x}{2}\right )+8 \csc ^3(x) \sin ^4\left (\frac {x}{2}\right )+\frac {48 \sin \left (\frac {x}{2}\right )}{\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )}-\frac {1}{2} \csc ^4\left (\frac {x}{2}\right ) \sin (x)+20 \tan \left (\frac {x}{2}\right )}{24 a} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^4/(a + a*Sin[x]),x]

[Out]

(-20*Cot[x/2] + 3*Csc[x/2]^2 + 36*Log[Cos[x/2]] - 36*Log[Sin[x/2]] - 3*Sec[x/2]^2 + 8*Csc[x]^3*Sin[x/2]^4 + (4
8*Sin[x/2])/(Cos[x/2] + Sin[x/2]) - (Csc[x/2]^4*Sin[x])/2 + 20*Tan[x/2])/(24*a)

________________________________________________________________________________________

Maple [A]
time = 0.13, size = 68, normalized size = 1.24

method result size
default \(\frac {\frac {\left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{3}-\left (\tan ^{2}\left (\frac {x}{2}\right )\right )+7 \tan \left (\frac {x}{2}\right )-\frac {1}{3 \tan \left (\frac {x}{2}\right )^{3}}+\frac {1}{\tan \left (\frac {x}{2}\right )^{2}}-\frac {7}{\tan \left (\frac {x}{2}\right )}-12 \ln \left (\tan \left (\frac {x}{2}\right )\right )-\frac {16}{\tan \left (\frac {x}{2}\right )+1}}{8 a}\) \(68\)
norman \(\frac {-\frac {1}{24 a}+\frac {\tan \left (\frac {x}{2}\right )}{12 a}-\frac {3 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{4 a}+\frac {3 \left (\tan ^{5}\left (\frac {x}{2}\right )\right )}{4 a}-\frac {\tan ^{6}\left (\frac {x}{2}\right )}{12 a}+\frac {\tan ^{7}\left (\frac {x}{2}\right )}{24 a}-\frac {15 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{4 a}}{\tan \left (\frac {x}{2}\right )^{3} \left (\tan \left (\frac {x}{2}\right )+1\right )}-\frac {3 \ln \left (\tan \left (\frac {x}{2}\right )\right )}{2 a}\) \(97\)
risch \(-\frac {9 i {\mathrm e}^{5 i x}-24 \,{\mathrm e}^{4 i x}+9 \,{\mathrm e}^{6 i x}-24 i {\mathrm e}^{3 i x}+39 \,{\mathrm e}^{2 i x}+7 i {\mathrm e}^{i x}-16}{3 \left ({\mathrm e}^{2 i x}-1\right )^{3} \left ({\mathrm e}^{i x}+i\right ) a}+\frac {3 \ln \left ({\mathrm e}^{i x}+1\right )}{2 a}-\frac {3 \ln \left ({\mathrm e}^{i x}-1\right )}{2 a}\) \(99\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^4/(a+a*sin(x)),x,method=_RETURNVERBOSE)

[Out]

1/8/a*(1/3*tan(1/2*x)^3-tan(1/2*x)^2+7*tan(1/2*x)-1/3/tan(1/2*x)^3+1/tan(1/2*x)^2-7/tan(1/2*x)-12*ln(tan(1/2*x
))-16/(tan(1/2*x)+1))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 120 vs. \(2 (49) = 98\).
time = 0.40, size = 120, normalized size = 2.18 \begin {gather*} \frac {\frac {21 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac {3 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {\sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}}}{24 \, a} + \frac {\frac {2 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac {18 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - \frac {69 \, \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} - 1}{24 \, {\left (\frac {a \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac {a \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}}\right )}} - \frac {3 \, \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{2 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^4/(a+a*sin(x)),x, algorithm="maxima")

[Out]

1/24*(21*sin(x)/(cos(x) + 1) - 3*sin(x)^2/(cos(x) + 1)^2 + sin(x)^3/(cos(x) + 1)^3)/a + 1/24*(2*sin(x)/(cos(x)
 + 1) - 18*sin(x)^2/(cos(x) + 1)^2 - 69*sin(x)^3/(cos(x) + 1)^3 - 1)/(a*sin(x)^3/(cos(x) + 1)^3 + a*sin(x)^4/(
cos(x) + 1)^4) - 3/2*log(sin(x)/(cos(x) + 1))/a

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 168 vs. \(2 (49) = 98\).
time = 0.40, size = 168, normalized size = 3.05 \begin {gather*} \frac {32 \, \cos \left (x\right )^{4} + 14 \, \cos \left (x\right )^{3} - 48 \, \cos \left (x\right )^{2} + 9 \, {\left (\cos \left (x\right )^{4} - 2 \, \cos \left (x\right )^{2} - {\left (\cos \left (x\right )^{3} + \cos \left (x\right )^{2} - \cos \left (x\right ) - 1\right )} \sin \left (x\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - 9 \, {\left (\cos \left (x\right )^{4} - 2 \, \cos \left (x\right )^{2} - {\left (\cos \left (x\right )^{3} + \cos \left (x\right )^{2} - \cos \left (x\right ) - 1\right )} \sin \left (x\right ) + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + 2 \, {\left (16 \, \cos \left (x\right )^{3} + 9 \, \cos \left (x\right )^{2} - 15 \, \cos \left (x\right ) - 6\right )} \sin \left (x\right ) - 18 \, \cos \left (x\right ) + 12}{12 \, {\left (a \cos \left (x\right )^{4} - 2 \, a \cos \left (x\right )^{2} - {\left (a \cos \left (x\right )^{3} + a \cos \left (x\right )^{2} - a \cos \left (x\right ) - a\right )} \sin \left (x\right ) + a\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^4/(a+a*sin(x)),x, algorithm="fricas")

[Out]

1/12*(32*cos(x)^4 + 14*cos(x)^3 - 48*cos(x)^2 + 9*(cos(x)^4 - 2*cos(x)^2 - (cos(x)^3 + cos(x)^2 - cos(x) - 1)*
sin(x) + 1)*log(1/2*cos(x) + 1/2) - 9*(cos(x)^4 - 2*cos(x)^2 - (cos(x)^3 + cos(x)^2 - cos(x) - 1)*sin(x) + 1)*
log(-1/2*cos(x) + 1/2) + 2*(16*cos(x)^3 + 9*cos(x)^2 - 15*cos(x) - 6)*sin(x) - 18*cos(x) + 12)/(a*cos(x)^4 - 2
*a*cos(x)^2 - (a*cos(x)^3 + a*cos(x)^2 - a*cos(x) - a)*sin(x) + a)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\csc ^{4}{\left (x \right )}}{\sin {\left (x \right )} + 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**4/(a+a*sin(x)),x)

[Out]

Integral(csc(x)**4/(sin(x) + 1), x)/a

________________________________________________________________________________________

Giac [A]
time = 0.48, size = 96, normalized size = 1.75 \begin {gather*} -\frac {3 \, \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right )}{2 \, a} + \frac {a^{2} \tan \left (\frac {1}{2} \, x\right )^{3} - 3 \, a^{2} \tan \left (\frac {1}{2} \, x\right )^{2} + 21 \, a^{2} \tan \left (\frac {1}{2} \, x\right )}{24 \, a^{3}} - \frac {2}{a {\left (\tan \left (\frac {1}{2} \, x\right ) + 1\right )}} + \frac {66 \, \tan \left (\frac {1}{2} \, x\right )^{3} - 21 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 3 \, \tan \left (\frac {1}{2} \, x\right ) - 1}{24 \, a \tan \left (\frac {1}{2} \, x\right )^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^4/(a+a*sin(x)),x, algorithm="giac")

[Out]

-3/2*log(abs(tan(1/2*x)))/a + 1/24*(a^2*tan(1/2*x)^3 - 3*a^2*tan(1/2*x)^2 + 21*a^2*tan(1/2*x))/a^3 - 2/(a*(tan
(1/2*x) + 1)) + 1/24*(66*tan(1/2*x)^3 - 21*tan(1/2*x)^2 + 3*tan(1/2*x) - 1)/(a*tan(1/2*x)^3)

________________________________________________________________________________________

Mupad [B]
time = 6.50, size = 89, normalized size = 1.62 \begin {gather*} \frac {7\,\mathrm {tan}\left (\frac {x}{2}\right )}{8\,a}-\frac {23\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+6\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-\frac {2\,\mathrm {tan}\left (\frac {x}{2}\right )}{3}+\frac {1}{3}}{8\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4+8\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{8\,a}+\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{24\,a}-\frac {3\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{2\,a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(x)^4*(a + a*sin(x))),x)

[Out]

(7*tan(x/2))/(8*a) - (6*tan(x/2)^2 - (2*tan(x/2))/3 + 23*tan(x/2)^3 + 1/3)/(8*a*tan(x/2)^3 + 8*a*tan(x/2)^4) -
 tan(x/2)^2/(8*a) + tan(x/2)^3/(24*a) - (3*log(tan(x/2)))/(2*a)

________________________________________________________________________________________